﻿using KinonekoSoftware.CodariaDB.Runtimes.Categories;

namespace KinonekoSoftware.CodariaDB.Objects
{
    /// <summary>
    /// <see cref="AbilityBPO"/> 类型表示技能设定的综合属性。
    /// </summary>
    /// <remarks>
    /// <para>AbilityBPO，Ability Bulk Properties Object</para>
    /// </remarks>
    public sealed class AbilityBPO : EmbeddedObject
    {
        public List<SystemCatalog>      DesignTable { get; set; }
        public List<AbilityBundleTable> BundleTable { get; set; }

        [BsonIgnore]
        public int Version { get; set; }

        public static AbilityBPO Create()
        {
            return new AbilityBPO
            {
                DesignTable = new List<SystemCatalog>(),
                BundleTable = new List<AbilityBundleTable>(),
                Version     = 1,
            };
        }
    }

    public abstract class AbilityTable : RootObject
    {
        private string _name;
        private string _intro;

        /// <summary>
        /// 获取或设置 <see cref="Intro"/> 属性。
        /// </summary>
        public string Intro
        {
            get => _intro;
            set => SetValue(ref _intro, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="Name"/> 属性。
        /// </summary>
        public string Name
        {
            get => _name;
            set => SetValue(ref _name, value);
        }
    }
}